import { cateList } from '../../../request/api'
const state = {
    catelist: []
}
const getters = {
    getCate(state) {
        return state.catelist
    }
}
const mutations = {
    REQ_LIST(state, payload) {
        state.catelist = payload
    }
}
const actions = {
    getCateActions({commit}) {
        cateList().then(res => {
            if (res.code == 200) {
                console.log(res,'res');
                commit('REQ_LIST', res.list)
            }
        })
    }
}
export default {
    state,
    getters,
    mutations,
    actions,
    namespaced: true
}